<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body class="layui-layout-body" style="margin-left: 15px;margin-top: 15px;">



<div class="layui-form">
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="100">
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>登录名</th>
            <th>头像</th>
            <th>状态</th>
            <th>角色</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${userList}">
            <tr>
                <td>${user.userEmail}</td>
                <td><img src="${user.userHeadImg != ''?user.userHeadImg:'/static/img/default.jpg'}" width="80px" height="50px"/></td>
                <td>${user.userStatus == 0?"启用":"禁用"}</td>
                <td>
                    <c:forEach var="role" items="${roleList}">
                        <c:if test="${role.roleId == user.userRole}">
                            ${role.roleName}
                        </c:if>
                    </c:forEach>
                </td>
                <td>
                    <div class="layui-btn-group">
                        <a href="/v2/UserServlet?method=pupdate&id=${user.userId}"  class="layui-btn layui-btn-normal layui-btn-radius">编辑</a>
                        <a  href="#" class="layui-btn layui-btn-danger layui-btn-radius">删除</a>
                    </div>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<script src="/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>
